<!DOCTYPE html>
<html lang="en-us">
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    
<meta charset="UTF-8">
<title>cat shards API | Elasticsearch Guide [7.7] | Elastic</title>
<link rel="home" href="index.html" title="Elasticsearch Guide [7.7]">
<link rel="up" href="cat.html" title="cat APIs">
<link rel="prev" href="cat-repositories.html" title="cat repositories API">
<link rel="next" href="cat-segments.html" title="cat segments API">
<meta name="DC.type" content="Learn/Docs/Elasticsearch/Reference/7.7">
<meta name="DC.subject" content="Elasticsearch">
<meta name="DC.identifier" content="7.7">
<meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://cdn.optimizely.com/js/18132920325.js"></script>
    <link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
    <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
    <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
    <link rel="manifest" href="/manifest.json">
    <meta name="apple-mobile-web-app-title" content="Elastic">
    <meta name="application-name" content="Elastic">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="/mstile-144x144.png">
    <meta name="theme-color" content="#ffffff">
    <meta name="naver-site-verification" content="936882c1853b701b3cef3721758d80535413dbfd">
    <meta name="yandex-verification" content="d8a47e95d0972434">
    <meta name="localized" content="true">
    <meta name="st:robots" content="follow,index">
    <meta property="og:image" content="https://www.elastic.co/static/images/elastic-logo-200.png">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link rel="apple-touch-icon-precomposed" sizes="64x64" href="/favicon_64x64_16bit.png">
    <link rel="apple-touch-icon-precomposed" sizes="32x32" href="/favicon_32x32.png">
    <link rel="apple-touch-icon-precomposed" sizes="16x16" href="/favicon_16x16.png">
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/guide/static/styles.css">
  </head>

  <!--© 2015-2021 Elasticsearch B.V. Copying, publishing and/or distributing without written permission is strictly prohibited.-->

  <body>
    <!-- Google Tag Manager -->
    <script>dataLayer = [];</script><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-58RLH5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-58RLH5');</script>
    <!-- End Google Tag Manager -->

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-12395217-16"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-12395217-16');
    </script>

    <!--BEGIN QUALTRICS WEBSITE FEEDBACK SNIPPET-->
    <script type="text/javascript">
      (function(){var g=function(e,h,f,g){
      this.get=function(a){for(var a=a+"=",c=document.cookie.split(";"),b=0,e=c.length;b<e;b++){for(var d=c[b];" "==d.charAt(0);)d=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length)}return null};
      this.set=function(a,c){var b="",b=new Date;b.setTime(b.getTime()+6048E5);b="; expires="+b.toGMTString();document.cookie=a+"="+c+b+"; path=/; "};
      this.check=function(){var a=this.get(f);if(a)a=a.split(":");else if(100!=e)"v"==h&&(e=Math.random()>=e/100?0:100),a=[h,e,0],this.set(f,a.join(":"));else return!0;var c=a[1];if(100==c)return!0;switch(a[0]){case "v":return!1;case "r":return c=a[2]%Math.floor(100/c),a[2]++,this.set(f,a.join(":")),!c}return!0};
      this.go=function(){if(this.check()){var a=document.createElement("script");a.type="text/javascript";a.src=g;document.body&&document.body.appendChild(a)}};
      this.start=function(){var a=this;window.addEventListener?window.addEventListener("load",function(){a.go()},!1):window.attachEvent&&window.attachEvent("onload",function(){a.go()})}};
      try{(new g(100,"r","QSI_S_ZN_emkP0oSe9Qrn7kF","https://znemkp0ose9qrn7kf-elastic.siteintercept.qualtrics.com/WRSiteInterceptEngine/?Q_ZID=ZN_emkP0oSe9Qrn7kF")).start()}catch(i){}})();
    </script><div id="ZN_emkP0oSe9Qrn7kF"><!--DO NOT REMOVE-CONTENTS PLACED HERE--></div>
    <!--END WEBSITE FEEDBACK SNIPPET-->

    <div id="elastic-nav" style="display:none;"></div>
    <script src="https://www.elastic.co/elastic-nav.js"></script>

    <!-- Subnav -->
    <div>
      <div>
        <div class="tertiary-nav d-none d-md-block">
          <div class="container">
            <div class="p-t-b-15 d-flex justify-content-between nav-container">
              <div class="breadcrum-wrapper"><span><a href="/guide/" style="font-size: 14px; font-weight: 600; color: #000;">Docs</a></span></div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="main-container">
      <section id="content">
        <div class="content-wrapper">

          <section id="guide" lang="en">
            <div class="container">
              <div class="row">
                <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                  <!-- start body -->
                  <div class="page_header">
<strong>IMPORTANT</strong>: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
<a href="../current/index.html">current release documentation</a>.
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="rest-apis.html">REST APIs</a></span>
»
<span class="breadcrumb-link"><a href="cat.html">cat APIs</a></span>
»
<span class="breadcrumb-node">cat shards API</span>
</div>
<div class="navheader">
<span class="prev">
<a href="cat-repositories.html">« cat repositories API</a>
</span>
<span class="next">
<a href="cat-segments.html">cat segments API »</a>
</span>
</div>
<div class="section">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="cat-shards"></a>cat shards API<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h2>
</div></div></div>

<p>The <code class="literal">shards</code> command is the detailed view of what nodes contain which
shards.  It will tell you if it’s a primary or replica, the number of
docs, the bytes it takes on disk, and the node where it’s located.</p>
<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-shards-api-request"></a>Request<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h3>
</div></div></div>
<p><code class="literal">GET /_cat/shards/&lt;index&gt;</code></p>
<p><code class="literal">GET /_cat/shards</code></p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-shards-path-params"></a>Path parameters<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">&lt;index&gt;</code>
</span>
</dt>
<dd>
(Optional, string) Comma-separated list or wildcard expression of index names
used to limit the request.
</dd>
</dl>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-shards-query-params"></a>Query parameters<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">bytes</code>
</span>
</dt>
<dd>
(Optional, <a class="xref" href="common-options.html#byte-units" title="Byte size units">byte size units</a>) Unit used to display byte values.
</dd>
<dt>
<span class="term">
<code class="literal">format</code>
</span>
</dt>
<dd>
(Optional, string) Short version of the
<a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html" class="ulink" target="_top">HTTP accept header</a>.
Valid values include JSON, YAML, etc.
</dd>
<dt>
<span class="term">
<code class="literal">h</code>
</span>
</dt>
<dd>
<p>
(Optional, string) Comma-separated list of column names to display.
</p>
<p>If you do not specify which columns to include, the API returns the default
columns in the order listed below. If you explicitly specify one or more
columns, it only returns the specified columns.</p>
<p>Valid columns are:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">index</code>, <code class="literal">i</code>, <code class="literal">idx</code>
</span>
</dt>
<dd>
(Default) Name of the index, such as <code class="literal">twitter</code>.
</dd>
<dt>
<span class="term">
<code class="literal">shard</code>, <code class="literal">s</code>, <code class="literal">sh</code>
</span>
</dt>
<dd>
(Default) Name of the shard.
</dd>
<dt>
<span class="term">
<code class="literal">prirep</code>, <code class="literal">p</code>, <code class="literal">pr</code>, <code class="literal">primaryOrReplica</code>
</span>
</dt>
<dd>
(Default) Shard type. Returned values are <code class="literal">primary</code> or <code class="literal">replica</code>.
</dd>
<dt>
<span class="term">
<code class="literal">state</code>, <code class="literal">st</code>
</span>
</dt>
<dd>
<p>
(Default) State of the shard. Returned values are:
</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<code class="literal">INITIALIZING</code>: The shard is recovering from a peer shard or gateway.
</li>
<li class="listitem">
<code class="literal">RELOCATING</code>: The shard is relocating.
</li>
<li class="listitem">
<code class="literal">STARTED</code>: The shard has started.
</li>
<li class="listitem">
<code class="literal">UNASSIGNED</code>: The shard is not assigned to any node.
</li>
</ul>
</div>
</dd>
<dt>
<span class="term">
<code class="literal">docs</code>, <code class="literal">d</code>, <code class="literal">dc</code>
</span>
</dt>
<dd>
(Default) Number of documents in shard, such as <code class="literal">25</code>.
</dd>
<dt>
<span class="term">
<code class="literal">store</code>, <code class="literal">sto</code>
</span>
</dt>
<dd>
(Default) Disk space used by the shard, such as <code class="literal">5kb</code>.
</dd>
<dt>
<span class="term">
<code class="literal">ip</code>
</span>
</dt>
<dd>
(Default) IP address of the node, such as <code class="literal">127.0.1.1</code>.
</dd>
<dt>
<span class="term">
<code class="literal">id</code>
</span>
</dt>
<dd>
(Default) ID of the node, such as <code class="literal">k0zy</code>.
</dd>
<dt>
<span class="term">
<code class="literal">node</code>, <code class="literal">n</code>
</span>
</dt>
<dd>
(Default) Node name, such as <code class="literal">I8hydUG</code>.
</dd>
<dt>
<span class="term">
<code class="literal">completion.size</code>, <code class="literal">cs</code>, <code class="literal">completionSize</code>
</span>
</dt>
<dd>
Size of completion, such as <code class="literal">0b</code>.
</dd>
<dt>
<span class="term">
<code class="literal">fielddata.memory_size</code>, <code class="literal">fm</code>, <code class="literal">fielddataMemory</code>
</span>
</dt>
<dd>
Used fielddata cache memory, such as <code class="literal">0b</code>.
</dd>
<dt>
<span class="term">
<code class="literal">fielddata.evictions</code>, <code class="literal">fe</code>, <code class="literal">fielddataEvictions</code>
</span>
</dt>
<dd>
Fielddata cache evictions, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">flush.total</code>, <code class="literal">ft</code>, <code class="literal">flushTotal</code>
</span>
</dt>
<dd>
Number of flushes, such as <code class="literal">1</code>.
</dd>
<dt>
<span class="term">
<code class="literal">flush.total_time</code>, <code class="literal">ftt</code>, <code class="literal">flushTotalTime</code>
</span>
</dt>
<dd>
Time spent in flush, such as <code class="literal">1</code>.
</dd>
<dt>
<span class="term">
<code class="literal">get.current</code>, <code class="literal">gc</code>, <code class="literal">getCurrent</code>
</span>
</dt>
<dd>
Number of current get operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">get.time</code>, <code class="literal">gti</code>, <code class="literal">getTime</code>
</span>
</dt>
<dd>
Time spent in get, such as <code class="literal">14ms</code>.
</dd>
<dt>
<span class="term">
<code class="literal">get.total</code>, <code class="literal">gto</code>, <code class="literal">getTotal</code>
</span>
</dt>
<dd>
Number of get operations, such as <code class="literal">2</code>.
</dd>
<dt>
<span class="term">
<code class="literal">get.exists_time</code>, <code class="literal">geti</code>, <code class="literal">getExistsTime</code>
</span>
</dt>
<dd>
Time spent in successful gets, such as <code class="literal">14ms</code>.
</dd>
<dt>
<span class="term">
<code class="literal">get.exists_total</code>, <code class="literal">geto</code>, <code class="literal">getExistsTotal</code>
</span>
</dt>
<dd>
Number of successful get operations, such as <code class="literal">2</code>.
</dd>
<dt>
<span class="term">
<code class="literal">get.missing_time</code>, <code class="literal">gmti</code>, <code class="literal">getMissingTime</code>
</span>
</dt>
<dd>
Time spent in failed gets, such as <code class="literal">0s</code>.
</dd>
<dt>
<span class="term">
<code class="literal">get.missing_total</code>, <code class="literal">gmto</code>, <code class="literal">getMissingTotal</code>
</span>
</dt>
<dd>
Number of failed get operations, such as <code class="literal">1</code>.
</dd>
<dt>
<span class="term">
<code class="literal">indexing.delete_current</code>, <code class="literal">idc</code>, <code class="literal">indexingDeleteCurrent</code>
</span>
</dt>
<dd>
Number of current deletion operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">indexing.delete_time</code>, <code class="literal">idti</code>, <code class="literal">indexingDeleteTime</code>
</span>
</dt>
<dd>
Time spent in deletions, such as <code class="literal">2ms</code>.
</dd>
<dt>
<span class="term">
<code class="literal">indexing.delete_total</code>, <code class="literal">idto</code>, <code class="literal">indexingDeleteTotal</code>
</span>
</dt>
<dd>
Number of deletion operations, such as <code class="literal">2</code>.
</dd>
<dt>
<span class="term">
<code class="literal">indexing.index_current</code>, <code class="literal">iic</code>, <code class="literal">indexingIndexCurrent</code>
</span>
</dt>
<dd>
Number of current indexing operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">indexing.index_time</code>, <code class="literal">iiti</code>, <code class="literal">indexingIndexTime</code>
</span>
</dt>
<dd>
Time spent in indexing, such as <code class="literal">134ms</code>.
</dd>
<dt>
<span class="term">
<code class="literal">indexing.index_total</code>, <code class="literal">iito</code>, <code class="literal">indexingIndexTotal</code>
</span>
</dt>
<dd>
Number of indexing operations, such as <code class="literal">1</code>.
</dd>
<dt>
<span class="term">
<code class="literal">indexing.index_failed</code>, <code class="literal">iif</code>, <code class="literal">indexingIndexFailed</code>
</span>
</dt>
<dd>
Number of failed indexing operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">merges.current</code>, <code class="literal">mc</code>, <code class="literal">mergesCurrent</code>
</span>
</dt>
<dd>
Number of current merge operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">merges.current_docs</code>, <code class="literal">mcd</code>, <code class="literal">mergesCurrentDocs</code>
</span>
</dt>
<dd>
Number of current merging documents, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">merges.current_size</code>, <code class="literal">mcs</code>, <code class="literal">mergesCurrentSize</code>
</span>
</dt>
<dd>
Size of current merges, such as <code class="literal">0b</code>.
</dd>
<dt>
<span class="term">
<code class="literal">merges.total</code>, <code class="literal">mt</code>, <code class="literal">mergesTotal</code>
</span>
</dt>
<dd>
Number of completed merge operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">merges.total_docs</code>, <code class="literal">mtd</code>, <code class="literal">mergesTotalDocs</code>
</span>
</dt>
<dd>
Number of merged documents, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">merges.total_size</code>, <code class="literal">mts</code>, <code class="literal">mergesTotalSize</code>
</span>
</dt>
<dd>
Size of current merges, such as <code class="literal">0b</code>.
</dd>
<dt>
<span class="term">
<code class="literal">merges.total_time</code>, <code class="literal">mtt</code>, <code class="literal">mergesTotalTime</code>
</span>
</dt>
<dd>
Time spent merging documents, such as <code class="literal">0s</code>.
</dd>
<dt>
<span class="term">
<code class="literal">query_cache.memory_size</code>, <code class="literal">qcm</code>, <code class="literal">queryCacheMemory</code>
</span>
</dt>
<dd>
Used query cache memory, such as <code class="literal">0b</code>.
</dd>
<dt>
<span class="term">
<code class="literal">query_cache.evictions</code>, <code class="literal">qce</code>, <code class="literal">queryCacheEvictions</code>
</span>
</dt>
<dd>
Query cache evictions, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">recoverysource.type</code>, <code class="literal">rs</code>
</span>
</dt>
<dd>
Type of recovery source.
</dd>
<dt>
<span class="term">
<code class="literal">refresh.total</code>, <code class="literal">rto</code>, <code class="literal">refreshTotal</code>
</span>
</dt>
<dd>
Number of refreshes, such as <code class="literal">16</code>.
</dd>
<dt>
<span class="term">
<code class="literal">refresh.time</code>, <code class="literal">rti</code>, <code class="literal">refreshTime</code>
</span>
</dt>
<dd>
Time spent in refreshes, such as <code class="literal">91ms</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.fetch_current</code>, <code class="literal">sfc</code>, <code class="literal">searchFetchCurrent</code>
</span>
</dt>
<dd>
Current fetch phase operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.fetch_time</code>, <code class="literal">sfti</code>, <code class="literal">searchFetchTime</code>
</span>
</dt>
<dd>
Time spent in fetch phase, such as <code class="literal">37ms</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.fetch_total</code>, <code class="literal">sfto</code>, <code class="literal">searchFetchTotal</code>
</span>
</dt>
<dd>
Number of fetch operations, such as <code class="literal">7</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.open_contexts</code>, <code class="literal">so</code>, <code class="literal">searchOpenContexts</code>
</span>
</dt>
<dd>
Open search contexts, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.query_current</code>, <code class="literal">sqc</code>, <code class="literal">searchQueryCurrent</code>
</span>
</dt>
<dd>
Current query phase operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.query_time</code>, <code class="literal">sqti</code>, <code class="literal">searchQueryTime</code>
</span>
</dt>
<dd>
Time spent in query phase, such as <code class="literal">43ms</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.query_total</code>, <code class="literal">sqto</code>, <code class="literal">searchQueryTotal</code>
</span>
</dt>
<dd>
Number of query operations, such as <code class="literal">9</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.scroll_current</code>, <code class="literal">scc</code>, <code class="literal">searchScrollCurrent</code>
</span>
</dt>
<dd>
Open scroll contexts, such as <code class="literal">2</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.scroll_time</code>, <code class="literal">scti</code>, <code class="literal">searchScrollTime</code>
</span>
</dt>
<dd>
Time scroll contexts held open, such as <code class="literal">2m</code>.
</dd>
<dt>
<span class="term">
<code class="literal">search.scroll_total</code>, <code class="literal">scto</code>, <code class="literal">searchScrollTotal</code>
</span>
</dt>
<dd>
Completed scroll contexts, such as <code class="literal">1</code>.
</dd>
<dt>
<span class="term">
<code class="literal">segments.count</code>, <code class="literal">sc</code>, <code class="literal">segmentsCount</code>
</span>
</dt>
<dd>
Number of segments, such as <code class="literal">4</code>.
</dd>
<dt>
<span class="term">
<code class="literal">segments.memory</code>, <code class="literal">sm</code>, <code class="literal">segmentsMemory</code>
</span>
</dt>
<dd>
Memory used by segments, such as <code class="literal">1.4kb</code>.
</dd>
<dt>
<span class="term">
<code class="literal">segments.index_writer_memory</code>, <code class="literal">siwm</code>, <code class="literal">segmentsIndexWriterMemory</code>
</span>
</dt>
<dd>
Memory used by index writer, such as <code class="literal">18mb</code>.
</dd>
<dt>
<span class="term">
<code class="literal">segments.version_map_memory</code>, <code class="literal">svmm</code>, <code class="literal">segmentsVersionMapMemory</code>
</span>
</dt>
<dd>
Memory used by version map, such as <code class="literal">1.0kb</code>.
</dd>
<dt>
<span class="term">
<code class="literal">segments.fixed_bitset_memory</code>, <code class="literal">sfbm</code>, <code class="literal">fixedBitsetMemory</code>
</span>
</dt>
<dd>
Memory used by fixed bit sets for nested object field types and type filters for
types referred in <a class="xref" href="parent-join.html" title="Join datatype"><code class="literal">join</code></a> fields, such as <code class="literal">1.0kb</code>.
</dd>
<dt>
<span class="term">
<code class="literal">seq_no.global_checkpoint</code>, <code class="literal">sqg</code>, <code class="literal">globalCheckpoint</code>
</span>
</dt>
<dd>
Global checkpoint.
</dd>
<dt>
<span class="term">
<code class="literal">seq_no.local_checkpoint</code>, <code class="literal">sql</code>, <code class="literal">localCheckpoint</code>
</span>
</dt>
<dd>
Local checkpoint.
</dd>
<dt>
<span class="term">
<code class="literal">seq_no.max</code>, <code class="literal">sqm</code>, <code class="literal">maxSeqNo</code>
</span>
</dt>
<dd>
Maximum sequence number.
</dd>
<dt>
<span class="term">
<code class="literal">suggest.current</code>, <code class="literal">suc</code>, <code class="literal">suggestCurrent</code>
</span>
</dt>
<dd>
Number of current suggest operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">suggest.time</code>, <code class="literal">suti</code>, <code class="literal">suggestTime</code>
</span>
</dt>
<dd>
Time spent in suggest, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">suggest.total</code>, <code class="literal">suto</code>, <code class="literal">suggestTotal</code>
</span>
</dt>
<dd>
Number of suggest operations, such as <code class="literal">0</code>.
</dd>
<dt>
<span class="term">
<code class="literal">sync_id</code>
</span>
</dt>
<dd>
Sync ID of the shard.
</dd>
<dt>
<span class="term">
<code class="literal">unassigned.at</code>, <code class="literal">ua</code>
</span>
</dt>
<dd>
Time at which the shard became unassigned in
<a href="https://en.wikipedia.org/wiki/List_of_UTC_time_offsets" class="ulink" target="_top">Coordinated Universal
Time (UTC)</a>.
</dd>
<dt>
<span class="term">
<code class="literal">unassigned.details</code>, <code class="literal">ud</code>
</span>
</dt>
<dd>
Details about why the shard became unassigned.
</dd>
<dt>
<span class="term">
<code class="literal">unassigned.for</code>, <code class="literal">uf</code>
</span>
</dt>
<dd>
Time at which the shard was requested to be unassigned in
<a href="https://en.wikipedia.org/wiki/List_of_UTC_time_offsets" class="ulink" target="_top">Coordinated Universal
Time (UTC)</a>.
</dd>
</dl>
</div>
<div class="variablelist">
<a id="reason-unassigned"></a>
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">unassigned.reason</code>, <code class="literal">ur</code>
</span>
</dt>
<dd>
<p>
Reason the shard is unassigned. Returned values are:
</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<code class="literal">ALLOCATION_FAILED</code>: Unassigned as a result of a failed allocation of the shard.
</li>
<li class="listitem">
<code class="literal">CLUSTER_RECOVERED</code>: Unassigned as a result of a full cluster recovery.
</li>
<li class="listitem">
<code class="literal">DANGLING_INDEX_IMPORTED</code>: Unassigned as a result of importing a dangling index.
</li>
<li class="listitem">
<code class="literal">EXISTING_INDEX_RESTORED</code>: Unassigned as a result of restoring into a closed index.
</li>
<li class="listitem">
<code class="literal">INDEX_CREATED</code>: Unassigned as a result of an API creation of an index.
</li>
<li class="listitem">
<code class="literal">INDEX_REOPENED</code>: Unassigned as a result of opening a closed index.
</li>
<li class="listitem">
<code class="literal">NEW_INDEX_RESTORED</code>: Unassigned as a result of restoring into a new index.
</li>
<li class="listitem">
<code class="literal">NODE_LEFT</code>: Unassigned as a result of the node hosting it leaving the cluster.
</li>
<li class="listitem">
<code class="literal">REALLOCATED_REPLICA</code>: A better replica location is identified and causes the existing replica allocation to be cancelled.
</li>
<li class="listitem">
<code class="literal">REINITIALIZED</code>: When a shard moves from started back to initializing.
</li>
<li class="listitem">
<code class="literal">REPLICA_ADDED</code>: Unassigned as a result of explicit addition of a replica.
</li>
<li class="listitem">
<code class="literal">REROUTE_CANCELLED</code>: Unassigned as a result of explicit cancel reroute command.
</li>
</ul>
</div>
</dd>
</dl>
</div>
</dd>
<dt>
<span class="term">
<code class="literal">help</code>
</span>
</dt>
<dd>
(Optional, boolean) If <code class="literal">true</code>, the response includes help information. Defaults
to <code class="literal">false</code>.
</dd>
<dt>
<span class="term">
<code class="literal">local</code>
</span>
</dt>
<dd>
(Optional, boolean) If <code class="literal">true</code>, the request retrieves information from the local
node only. Defaults to <code class="literal">false</code>, which means information is retrieved from
the master node.
</dd>
<dt>
<span class="term">
<code class="literal">master_timeout</code>
</span>
</dt>
<dd>
(Optional, <a class="xref" href="common-options.html#time-units" title="Time units">time units</a>) Specifies the period of time to wait for
a connection to the master node. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to <code class="literal">30s</code>.
</dd>
<dt>
<span class="term">
<code class="literal">s</code>
</span>
</dt>
<dd>
(Optional, string) Comma-separated list of column names or column aliases used
to sort the response.
</dd>
<dt>
<span class="term">
<code class="literal">time</code>
</span>
</dt>
<dd>
(Optional, <a class="xref" href="common-options.html#time-units" title="Time units">time units</a>)
Unit used to display time values.
</dd>
<dt>
<span class="term">
<code class="literal">v</code>
</span>
</dt>
<dd>
(Optional, boolean) If <code class="literal">true</code>, the response includes column headings.
Defaults to <code class="literal">false</code>.
</dd>
</dl>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-shards-api-example"></a>Examples<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="cat-shards-api-example-single"></a>Example with a single index<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h4>
</div></div></div>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET _cat/shards</pre>
</div>
<div class="console_widget" data-snippet="snippets/1372.console"></div>
<p>The API returns the following response:</p>
<div class="pre_wrapper lang-txt">
<pre class="programlisting prettyprint lang-txt">twitter 0 p STARTED 3014 31.1mb 192.168.56.10 H5dfFeA</pre>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="cat-shards-api-example-wildcard"></a>Example with a index wildcard pattern<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h4>
</div></div></div>
<p>If your cluster has many shards, you can use a wildcard pattern in the <code class="literal">{index}</code>
path parameter to limit the API request.</p>
<p>The following request returns information for any indices beginning with
<code class="literal">twitt</code>.</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET _cat/shards/twitt*</pre>
</div>
<div class="console_widget" data-snippet="snippets/1373.console"></div>
<p>The API returns the following response:</p>
<div class="pre_wrapper lang-txt">
<pre class="programlisting prettyprint lang-txt">twitter 0 p STARTED 3014 31.1mb 192.168.56.10 H5dfFeA</pre>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="relocation"></a>Example with a relocating shard<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h4>
</div></div></div>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET _cat/shards</pre>
</div>
<div class="console_widget" data-snippet="snippets/1374.console"></div>
<p>The API returns the following response:</p>
<div class="pre_wrapper lang-txt">
<pre class="programlisting prettyprint lang-txt">twitter 0 p RELOCATING 3014 31.1mb 192.168.56.10 H5dfFeA -&gt; -&gt; 192.168.56.30 bGG90GE</pre>
</div>
<p>The <code class="literal">RELOCATING</code> value in <code class="literal">state</code> column indicates the index shard is
relocating.</p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="states"></a>Example with a shard states<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h4>
</div></div></div>
<p>Before a shard is available for use, it goes through an <code class="literal">INITIALIZING</code> state.
You can use the cat shards API to see which shards are initializing.</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET _cat/shards</pre>
</div>
<div class="console_widget" data-snippet="snippets/1375.console"></div>
<p>The API returns the following response:</p>
<div class="pre_wrapper lang-txt">
<pre class="programlisting prettyprint lang-txt">twitter 0 p STARTED      3014 31.1mb 192.168.56.10 H5dfFeA
twitter 0 r INITIALIZING    0 14.3mb 192.168.56.30 bGG90GE</pre>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h4 class="title">
<a id="_example_with_reasons_for_unassigned_shards"></a>Example with reasons for unassigned shards<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/shards.asciidoc">edit</a>
</h4>
</div></div></div>
<p>The following request returns the <code class="literal">unassigned.reason</code> column, which indicates
why a shard is unassigned.</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET _cat/shards?h=index,shard,prirep,state,unassigned.reason</pre>
</div>
<div class="console_widget" data-snippet="snippets/1376.console"></div>
<p>The API returns the following response:</p>
<div class="pre_wrapper lang-txt">
<pre class="programlisting prettyprint lang-txt">twitter 0 p STARTED    3014 31.1mb 192.168.56.10 H5dfFeA
twitter 0 r STARTED    3014 31.1mb 192.168.56.30 bGG90GE
twitter 0 r STARTED    3014 31.1mb 192.168.56.20 I8hydUG
twitter 0 r UNASSIGNED ALLOCATION_FAILED</pre>
</div>
</div>

</div>

</div>
<div class="navfooter">
<span class="prev">
<a href="cat-repositories.html">« cat repositories API</a>
</span>
<span class="next">
<a href="cat-segments.html">cat segments API »</a>
</span>
</div>
</div>

                  <!-- end body -->
                </div>
                <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                  <div id="rtpcontainer" style="display: block;">
                    <div class="mktg-promo">
                      <h3>Most Popular</h3>
                      <ul class="icons">
                        <li class="icon-elasticsearch-white"><a href="https://www.elastic.co/webinars/getting-started-elasticsearch?baymax=default&amp;elektra=docs&amp;storm=top-video">Get Started with Elasticsearch: Video</a></li>
                        <li class="icon-kibana-white"><a href="https://www.elastic.co/webinars/getting-started-kibana?baymax=default&amp;elektra=docs&amp;storm=top-video">Intro to Kibana: Video</a></li>
                        <li class="icon-logstash-white"><a href="https://www.elastic.co/webinars/introduction-elk-stack?baymax=default&amp;elektra=docs&amp;storm=top-video">ELK for Logs &amp; Metrics: Video</a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </section>

        </div>


<div id="elastic-footer"></div>
<script src="https://www.elastic.co/elastic-footer.js"></script>
<!-- Footer Section end-->

      </section>
    </div>

<script src="/guide/static/jquery.js"></script>
<script type="text/javascript" src="/guide/static/docs.js"></script>
<script type="text/javascript">
  window.initial_state = {}</script>
  </body>
</html>
